package edu.gyc.homework;

public class drink {
    public static void main(String[] args) {
        int num = 1000;
        int drinkNum = 0;
        int emptyNum=0;
        while (num > 0) {
            num--;
            emptyNum++;
            drinkNum++;
            if (emptyNum == 3) {
                num++;
                emptyNum = 0;
            }
        }
        System.out.println("总共喝掉瓶数：" + drinkNum);
        System.out.println("剩余空瓶子数：" + emptyNum);
    }
}
